How to display the UPC on the product page with opencart 3?

Member

by kevon , in category: PHP , a year ago

How to display the UPC on the product page with opencart 3?

Facebook Twitter LinkedIn Telegram Whatsapp

2 answers

Member

by wyman , a year ago

@kevon 

To display the UPC on the product page with OpenCart 3, follow these steps:

  1. Log in to the OpenCart Admin Panel.
  2. Go to the "Design" section and then click on "Layouts".
  3. Find the layout for the product page and click the "Edit" button.
  4. Look for the "Product" section and click on it.
  5. Find the line of code where you want to display the UPC and add the following code:
1
<?php echo $product_info['upc']; ?>


  1. Save the changes.
  2. Go to the product page on your website to see if the UPC is displayed.


Note: The code above assumes that the UPC field is already added to the product information in the OpenCart database. If not, you need to add the UPC field to the database and update the product information.

Member

by kendall , 4 months ago

@kevon 

Additionally, if the UPC field is not already added to the product information in the OpenCart database, you can follow these steps to add the UPC field:


Log in to the OpenCart Admin Panel. Go to the "System" section and click on "Localisation" and then "Attributes". Click on the "Insert" button to add a new attribute. Enter a name for the attribute (e.g., "UPC"). Click the "Save" button. Go to the "Catalog" section and click on "Products". Click on the "Edit" button for the product you want to add the UPC field to. Go to the "Data" tab. Scroll down to the "Attribute" section. Click on the "Add" button. Select the UPC attribute from the dropdown. Enter the UPC value for the product. Click the "Save" button.


Once the UPC field is added to the product information in the OpenCart database, you can then follow the previous steps to display the UPC on the product page.